<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pin: OPTIONAL_VALUE&lt; T &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pin
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structOPTIONAL__VALUE-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">OPTIONAL_VALUE&lt; T &gt; Struct Template Reference<div class="ingroups"><a class="el" href="group__UTIL__REF.html">Utilities API Reference</a> &raquo; <a class="el" href="group__UTILS.html">Utilities for tokenizing strings and general functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a251359029b6a8b845bf28beb6e4a9077"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structOPTIONAL__VALUE.html#a251359029b6a8b845bf28beb6e4a9077">Set</a> (const T &amp;value)</td></tr>
<tr class="separator:a251359029b6a8b845bf28beb6e4a9077"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78cd62f851dd8f4f3c8cab55b48cdb39"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structOPTIONAL__VALUE.html#a78cd62f851dd8f4f3c8cab55b48cdb39">Set</a> (const T *pValue)</td></tr>
<tr class="separator:a78cd62f851dd8f4f3c8cab55b48cdb39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62bca6274297aea8deb117d84e07005e"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structOPTIONAL__VALUE.html#a62bca6274297aea8deb117d84e07005e">Reset</a> ()</td></tr>
<tr class="separator:a62bca6274297aea8deb117d84e07005e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac64b01d6a8f836b3d93988d11d7fc937"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structOPTIONAL__VALUE.html#ac64b01d6a8f836b3d93988d11d7fc937">Get</a> (T *pValue) const</td></tr>
<tr class="separator:ac64b01d6a8f836b3d93988d11d7fc937"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e35eff825d6f2106dc12518ecee99be"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structOPTIONAL__VALUE.html#a1e35eff825d6f2106dc12518ecee99be">HasValue</a> () const</td></tr>
<tr class="separator:a1e35eff825d6f2106dc12518ecee99be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a132bb9f5252ea6ea862d8834427ee241"><td class="memItemLeft" align="right" valign="top">T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structOPTIONAL__VALUE.html#a132bb9f5252ea6ea862d8834427ee241">Value</a> ()</td></tr>
<tr class="separator:a132bb9f5252ea6ea862d8834427ee241"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6a2f9d03c12156e6d8b4731a933992b"><td class="memItemLeft" align="right" valign="top"><a id="ad6a2f9d03c12156e6d8b4731a933992b"></a>
const T &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>Value</b> () const</td></tr>
<tr class="separator:ad6a2f9d03c12156e6d8b4731a933992b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9eb3e17f5130070d6283519bcc9f9a50"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structOPTIONAL__VALUE.html#a9eb3e17f5130070d6283519bcc9f9a50">ValuePtr</a> ()</td></tr>
<tr class="separator:a9eb3e17f5130070d6283519bcc9f9a50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a836e1440448d5d4b1dc635f638abd651"><td class="memItemLeft" align="right" valign="top"><a id="a836e1440448d5d4b1dc635f638abd651"></a>
const T *&#160;</td><td class="memItemRight" valign="bottom"><b>ValuePtr</b> () const</td></tr>
<tr class="separator:a836e1440448d5d4b1dc635f638abd651"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a3baf179116ef07e0fbc2c919aee6bd02"><td class="memItemLeft" align="right" valign="top"><a id="a3baf179116ef07e0fbc2c919aee6bd02"></a>
BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structOPTIONAL__VALUE.html#a3baf179116ef07e0fbc2c919aee6bd02">m_hasValue</a></td></tr>
<tr class="separator:a3baf179116ef07e0fbc2c919aee6bd02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aece54c999c1476c8ec6ed5d1f3b7841c"><td class="memItemLeft" align="right" valign="top"><a id="aece54c999c1476c8ec6ed5d1f3b7841c"></a>
T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structOPTIONAL__VALUE.html#aece54c999c1476c8ec6ed5d1f3b7841c">m_value</a></td></tr>
<tr class="separator:aece54c999c1476c8ec6ed5d1f3b7841c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
struct OPTIONAL_VALUE&lt; T &gt;</h3>

<p>Template POD structure that optionally keeps a value of type &lt;T&gt;. </p><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>the value type </td></tr>
  </table>
  </dd>
</dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ac64b01d6a8f836b3d93988d11d7fc937"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac64b01d6a8f836b3d93988d11d7fc937">&#9670;&nbsp;</a></span>Get()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">BOOL <a class="el" href="structOPTIONAL__VALUE.html">OPTIONAL_VALUE</a>&lt; T &gt;::Get </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>pValue</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the value of this object, if previously assigned. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">pValue</td><td>optional pointer to variable that receives the value assigned to this object, if any </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if a value has been assigned to this object. </dd></dl>

</div>
</div>
<a id="a1e35eff825d6f2106dc12518ecee99be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e35eff825d6f2106dc12518ecee99be">&#9670;&nbsp;</a></span>HasValue()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">BOOL <a class="el" href="structOPTIONAL__VALUE.html">OPTIONAL_VALUE</a>&lt; T &gt;::HasValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>TRUE if a value has been assigned to this object. </dd></dl>

</div>
</div>
<a id="a62bca6274297aea8deb117d84e07005e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62bca6274297aea8deb117d84e07005e">&#9670;&nbsp;</a></span>Reset()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">VOID <a class="el" href="structOPTIONAL__VALUE.html">OPTIONAL_VALUE</a>&lt; T &gt;::Reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Remove the previous value assignment, if any. </p>

</div>
</div>
<a id="a251359029b6a8b845bf28beb6e4a9077"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a251359029b6a8b845bf28beb6e4a9077">&#9670;&nbsp;</a></span>Set() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">VOID <a class="el" href="structOPTIONAL__VALUE.html">OPTIONAL_VALUE</a>&lt; T &gt;::Set </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Assign the specified value to this object. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>the new value to be assigned to this object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a78cd62f851dd8f4f3c8cab55b48cdb39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78cd62f851dd8f4f3c8cab55b48cdb39">&#9670;&nbsp;</a></span>Set() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">VOID <a class="el" href="structOPTIONAL__VALUE.html">OPTIONAL_VALUE</a>&lt; T &gt;::Set </td>
          <td>(</td>
          <td class="paramtype">const T *&#160;</td>
          <td class="paramname"><em>pValue</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Assign a value to this object or remove the previous assignment. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pValue</td><td>pointer to the new value to be assigned to this object or NULL to remove the previous assignment </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a132bb9f5252ea6ea862d8834427ee241"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a132bb9f5252ea6ea862d8834427ee241">&#9670;&nbsp;</a></span>Value()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T&amp; <a class="el" href="structOPTIONAL__VALUE.html">OPTIONAL_VALUE</a>&lt; T &gt;::Value </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>reference to the value assigned to this object. The caller must ensure that a value has already been assigned to this object. </dd></dl>

</div>
</div>
<a id="a9eb3e17f5130070d6283519bcc9f9a50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9eb3e17f5130070d6283519bcc9f9a50">&#9670;&nbsp;</a></span>ValuePtr()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="structOPTIONAL__VALUE.html">OPTIONAL_VALUE</a>&lt; T &gt;::ValuePtr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get a pointer to the value of this object, if the value has been assigned. </p><dl class="section return"><dt>Returns</dt><dd>pointer to the value kept in this object or NULL if no value has been assigned to this object. </dd></dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>util.PH</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
